﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sem título</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="soma.php">
    <input type="text" name="campo1" id="campo1" />
    <input type="text" name="campo2" id="campo2" />
    <input type="submit" name="bt_ok" id="bt_ok" value="OK" />
    <input type="text" name="campo2" id="campo3" value="<?php echo $_REQUEST["XXX"];?>"/>
    <input type="text" name="campo2" id="campo4" />
</form>
<?php 
//session_start(); $_GET[""]
$oteste = new calc($_POST["valor1"], $_POST["valor2"]);
//session["resposta"] = $oteste-> get_resp();
echo $oteste-> get_resp();
header("location: index.php?xxx=" + $oteste->get_resp());
?>
</body>
</html>